import { reactive, computed, toRefs } from "vue";
import { useUserStoreHook } from "@/store/modules/user";

const userStore = useUserStoreHook();

/**
 * @description 判断当前是否为车载系统
 * */
export const useIsWindow7 = () => {
  const state: any = reactive({
    isWindow7: computed(() => userStore.isWindow7),
  });

  // socket重连
  const setIsWindow7 = (value: boolean) => {
    userStore.setIsWindow7(value);
  };

  return {
    ...toRefs(state),
    setIsWindow7,
  };
};
